package com.itheima.wechatweb;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.pojo.Member;
import com.itheima.service.MemberService;
import org.checkerframework.checker.units.qual.C;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @outhor
 * @date 2020/2/12 14:34
 */

@RequestMapping("member")
@RestController
public class memberController {

    @Reference
    private MemberService memberService;

    @RequestMapping("getFamily")
    public Result getFamily(@com.itheima.interceptors.Member Member member){
        List<Member> members = memberService.getFamily(member.getId());
        return new Result(true,"",members);
    }

    @RequestMapping("getoneself")
    public Result getoneself(@com.itheima.interceptors.Member Member member){
        return new Result(true,"",member);
    }
}
